home *** CD-ROM | disk | FTP | other *** search
- Path: newsbf02.news.aol.com!not-for-mail
- From: cperkins@aol.com (C Perkins)
- Newsgroups: comp.lang.c++
- Subject: overloading new operator
- Date: 18 Feb 1996 17:52:11 -0500
- Organization: America Online, Inc. (1-800-827-6364)
- Sender: root@newsbf02.news.aol.com
- Message-ID: <4g8air$6a0@newsbf02.news.aol.com>
- Reply-To: cperkins@aol.com (C Perkins)
- NNTP-Posting-Host: newsbf02.mail.aol.com
-
- Does anyone have a simple sample of overriding the new operator? How do I
- use new placement with constructors that take multiple arguments?
-
- I have a number of classes which have constructors that take multiple
- arguments. Is it possible to dynamically create objects of these classes
- using placement? Can anyone show me an example?
-
- Or am I going at this the wrong way? If I overload new with placement, is
- my task simply to allocate the memory, and will the compiler then handle
- calling the correct constructor?
-
- I've gone through nearly every book C++ I've got, and all mention
- overloading new, but none have any examples.
-
- Thanks
-
- Chris Perkins
- cperkins@medialab.com
- cperkins@aol.com
-